import java.io.IOException;

import org.apache.lucene.document.Document;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.ScoreDoc;

public class LuceneSearchResult {
	private ScoreDoc[] mScoreDocArray;
	private IndexSearcher mSearcher;

	public LuceneSearchResult(ScoreDoc[] scoreDocArray, IndexSearcher indexSearcher) {
		mScoreDocArray = scoreDocArray;
		mSearcher = indexSearcher;
	}

	public Document getDoc(int docId) throws IOException {
		return mSearcher.doc(docId);
	}
	
	public ScoreDoc[] getScoreDoc() {
		return mScoreDocArray;
	}
}
